//引入模块
import Vue from 'vue'
import Router from 'vue-router'
import "animate.css/animate.css"

//引入组件
// import Login from '../components/Login'
// import Register from '../components/register'
import Chat from '../view/Chat'
import Contact from '../view/Contact'
import  Records from '../view/Records'
import Gold from '../view/Gold'
import NewList from '../news/NewList'
import Comments from '../news/Comments'
import Photos from '../news/Photos'
import Photoinfo from '../news/Photoinfo'
import Goodslist from '../news/Goodslist'
import GoodsInfo from '../news/GoodsInfo'




//手动注册路由
Vue.use(Router)
//暴露路由实例
export default new Router ({
  routes:[
    // {
    //   path:'/Login',
    //   component: Login
    // },
    // {
    //   path:'/Register',
    //   component: Register
    // }
    {
      path:'/',//可小写
      redirect: '/Chat'
    },
    {
      path:'/Chat',//可小写
      component: Chat
    },
    {
      path:'/Contact',
      component: Contact
    },
    {
      path:'/Records',
      component: Records
    },
    {
      path:'/Gold',
      component: Gold
    },
    {
      path:'/Chat/NewList',
      component: NewList
    },
    {
      path:'/NewList/Comments/:id',
      component:Comments
    },
    {
      path:'/Chat/Photos',
      component: Photos
    },
    {
      path:'/Photos/Photoinfo/:id',
      component:Photoinfo
    },
    {
      path:'/Chat/Goodslist',
      component: Goodslist
    },
    {
      name:'goodsinfo',
      path:'/Chat/Goodslist/GoodsInfo/:id',
      component: GoodsInfo
    },
  ] 
})

